package com.wn.service.impl;

import com.wn.dao.RoleDao;
import com.wn.service.RoleService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.Map;
import java.util.Set;

public class RoleServiceImpl implements RoleService {
    public static void main(String[] args) {
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext.xml");
        RoleDao roleDao = applicationContext.getBean("roleDao", RoleDao.class);
        Map<String, String> map = roleDao.findById(1);
        Set<Map.Entry<String, String>> entries = map.entrySet();
        for (Map.Entry<String, String> key :entries) {
            System.out.println(key);
        }
    }
}
